A New Approach for Encryption and Decryption

 

A. Manimaran1,*, V. M. Chandrasekaran2, Arnav Bhutani3, Vansh Badkul4

1,2 School of Advanced Sciences, VIT University, Vellore-632014, India.

3,4 School of Information Technology, VIT University, Vellore-632014, India.

*Corresponding Author E-mail: marans2011@gmail.com1, vmcsn@yahoo.co.in2, arnav.bhutani2015@vit.ac.in4, vansh.badkul2015@vit.ac.in4

 

ABSTRACT:

Past few decades have seen significant growth in the field of information technology and communication. This growth has also increased threat to the user sending the message. The practice of cryptography plays an important role in safeguarding the messages through encryption and decryption. Many authors have contributed their research towards encryption and decryption. In this paper we have provided an algorithm of dynamic approach for encrypting and decrypting message using base conversion, ASCII values and time stamp.

 

KEYWORDS: Dynamic encryption, ASCII value, Base conversion, Encryption, Decryption.

 

 


INTRODUCTION:

Cryptography is blend of information security and mathematics. The main purpose of encryption is that only the authorized person can decode the message with the help of decryption scheme. It involves processing a message sent by a user by using a cipher to create an output which seems vague to the third party. It was Zimmerman [1] who explained the importance of encryption for hiding messages and data from unwanted third parties. Sukhraliya et al.[3] described the method of using ASCII values for encryption and decryption. Kumar et al. [4] further devised a complex way of using ASCII value. Moreover, an effective method of encrypting data is by formation of a dynamic algorithm. Its effectiveness lies in the fact that the same message will have a different encrypted data each hour thus making it difficult to decrypt without the decryption scheme.  Chandrasekaran et al. [2]   devised the method of encrypting data using dice and binary conversions in 2015.  In this paper, we have proposed a method of encrypting the message using ASCII table and decimal to quaternary conversion.

 

Proposed Method:

In this paper, we will use the basic concept of base conversion and dynamic encryption.

 

The following steps will explain it further-

1.      We can take all possible combinations of a text (numbers, alphabets, alphnumeric,special symbols) which we are aiming to encrypt. We take each of the character individually and process it.

2.      We multiple the current hour of the 24 hour clock with the ASCII value of the character to be encrypted.

3.      The product is converted into quatenary number system by using the decimal to quartenary conversion method.

4.      Each character of the message is converted into a set of six digits. After conversion to quartenary number system if the number has less than 6 digits then we add leading zeros to make it a six digit representation.

5.      To represent blank space after each word we use null set 000000.

6.      To make the decryption possible, time of encryption is sent in the message as time stamp. The hour of encryption is sent as the first two places of the entire message.

Conversion from decimal to quaternary number system

1.      Start dividing the decimal number by 4 using long division method.

2.      Write the quotient in the successive rows and remainder of the decimal number in the columns  adjacent to the quotient.   

3.      Recurse the process until the quotient becomes zero.

4.      Starting from the bottom column and working upward, write down the remainder values from left to right.

5.      The digit in the last column is written first. Then the second from bottom is written next, and so on for each digit.

6.      Add zero in front of the number which has less than 6 digits till it becomes a 6 digit  base 4  number.


 

Encryption and Decryption scheme:

Encryption Scheme:

 

Decryption Scheme

Pseudocode:

Create a time variable.

Get the local time.

Take the first two digits of the hour value from the local time and store it in a time variable.

Input the string (or read it from a file) to be encrypted.

Take a for loop à for getting every word  

                   For loopàfor getting every character in a word

Process the conversion by multiplying the ASCII value of individual character with the time variable.

character*(time variable)

Create a product variable and store the result in it.

Using a stack, to push the elements àprocess à pop to generate the result of the conversion which is done in the following way.

Push the elements in the sequence into the stack.

Createa function

divideBy4(decNum):

        remainderstack = Stack()

    while decNumber > 0:

        rem = decNumber % 4

        remainderstack.push(rem) //push the element in the stack

        decNumr = decNum  // 4

    Encrypted_No= ""

    while not remainderstack.isEmpty():

        Encrypted_No = Encrypted_No + str(remstack.pop())

    return Encrypted_No

then print(divideBy4(845))

845 // 4 = 211 rem=1

 

The result will give us the encrypted message

Example

Encryption of message

Message: - Account password – FDETA

Time of encryption- 09:28

Product of current time and ASCII values

A->585 (65), c->891 (99), c->891 (99), o->999 (111), u->1053 (117) , n->990 (110), t->1044 (116) , p->1008 (112) , a-> 873 (97), s->1035 (115), s->1035 (115), w-> 1071 (119), o-> 999 (111),  r->1026 (114), d->900 (100), ‘-‘ -> 405 (45), F->630 (70), D->612 (68) , E->621 (69), T-> 756 (84),  A->585 (65)

Decimal to Quaternary base conversion

A-> 021021    c-> 031323    c-> 031323    o-> 033213   u-> 100131   n->033132   t-> 100110

p-> 033300    a-> 031221    s-> 100023    s-> 100023    w->100233   o->033213   r->100002

d-> 032010    F-> 021312    D-> 021210   E-> 021231    T->023310    A->021021

The first 2 places of the message will be 09

Encrypted message

09021021031323031323033213100131033132100110000000033300031221100023100023100233033213100002032010000000012111000000021312021210021231023310021021

 

Example

Encryption of phone number

Time of encryption- 23:10

9879107750

9->110133                 8->110020              7->103301                 9->110133                  1->101213    

0-> 101100                7->103301              7->103301                 5->103003                  0->101100

Encrypted message

23110133110020103301110133101213101100103301103301103003101100

 

Example

Decryption of message

13031031112112113113120023110201113022

Conversion of six digit base 4 number to decimal number

031031-> 845       112112->1430        113113->1495      120023->1547      110201->1313    113022->1482

Finding ASCII values by dividing the number by 13

845-> 65       1430->110       1495-> 115    1547-> 119     1313->101       1482->114

Converting ASCII value to characters

65-> A       110-> n   115-> s     119-> w       101-> e   114-> r

Decrypted message- Answer     

 


CONCLUSION:

In this paper we have proposed a dynamic approach of encrypting a message for safer transmission. The ASCII values of the characters are multiplied with the current hour. The decimal product is then converted to base 4 number. The hour of encryption are sent as first two places of the message which will be required at the time of decryption. The following encryption technique makes the message appear as complex set of numbers ranging from 0-3. Each character of message is converted into set of 6 digit number. Thus making the message long and appear vague to the third party. Since the approach is dynamic and the same message will have different encryption after every hour, it becomes very difficult for the third party to decrypt it.

 

REFERENCES:

1.       P. Zimmerman, An Introduction to Cryptography, Doubleday and Company, Inc., United States of America, USA, 1999.

2.       V.M. Chandrasekaran, A. Manimaran, Akhil Ranjan, Cryptography using a Pair of Dice, International Journal of PharmTech Research, Inc., 7(1), 85 - 89,  2015.

3.       Vineet Sukhraliya, Sumit Chaudhary, Sangeeta Solanki, Encryption and Decryption Algorithm using ASCII values with substitution array Approach, International Journal of Advanced Research in Computer and Communication Engineering, 2(8), 3094 - 3097, 2013.

4.       Kumar, Narander, and Priyanka Chaudhary, Performance Evaluation of Encryption/Decryption Mechanisms to Enhance Data Security, Indian Journal of Science and Technology, 9(20), 1 – 10, 2016.

 

 

 

 

Received on 02.12.2016                          Modified on 19.12.2016

Accepted on 24.12.2016                 © RJPT All right reserved

Research J. Pharm. and Tech. 2016; 9(12)2322-2326.

DOI: 10.5958/0974-360X.2016.00466.2